package com.aspose.cells;

class zbzz extends zcdb {
   private Workbook a;
   private zazp b;

   zbzz(zazp var1, Workbook var2) throws Exception {
      this.a = var2;
      this.b = var1;
      this.a();
      this.d = 415;
   }

   private void a() throws Exception {
      byte var1 = 37;
      int var6 = var1 + 4 + this.b.w.length() * 2;
      if (this.b.d == null) {
         var6 += 8;
      } else {
         var6 += this.b.d.length;
      }

      var6 += this.a(this.b.j);
      var6 += this.a(this.b.l);
      var6 += this.a(this.b.n);
      var6 += this.a(this.b.x);
      var6 += this.a(this.b.h);
      if (this.b.c == null) {
         var6 += 8;
      } else {
         var6 += this.b.c.length;
      }

      var6 += this.a(this.b.k);
      var6 += this.a(this.b.m);
      var6 += this.a(this.b.o);
      var6 += this.a(this.b.y);
      var6 += this.a(this.b.i);
      this.c = new byte[var6];
      zbaa var2 = new zbaa(this.b);
      int var3 = var2.a(this.c);
      System.arraycopy(com.aspose.cells.b.a.zc.a(this.b.v), 0, this.c, var3, 2);
      var3 += 2;
      int var4 = 0;
      if (this.b.p) {
         var4 |= 1;
      }

      if (this.b.q) {
         var4 |= 2;
      }

      this.c[var3] = (byte)var4;
      ++var3;
      this.c[var3] = 9;
      var3 += 2;
      var4 = 0;
      if (this.b.r) {
         var4 |= 2;
      }

      var4 |= (byte)((this.b.d() & 255) << 2);
      var4 |= (this.b.f() & 255) << 4;
      int var5 = 0;
      if (this.b.t) {
         var5 |= 1;
      }

      if (this.b.j != null && !"".equals(this.b.j)) {
         var5 |= 2;
         var4 |= 1;
      }

      if (this.b.l != null && !"".equals(this.b.l)) {
         var5 |= 4;
         var4 |= 1;
      }

      if (this.b.n != null && !"".equals(this.b.n)) {
         var5 |= 8;
         var4 |= 1;
      }

      if (this.b.x != null && !"".equals(this.b.x)) {
         var5 |= 16;
         var4 |= 1;
      }

      if (this.b.h != null && !"".equals(this.b.h)) {
         var5 |= 32;
         var4 |= 1;
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, this.c, var3, 2);
      var3 += 2;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, this.c, var3, 2);
      var3 += 2;
      var3 += 2;
      var4 = 0;
      if (this.b.s) {
         var4 |= 2;
      }

      var4 |= (byte)((this.b.e() & 255) << 2);
      var4 |= (this.b.g() & 255) << 4;
      var5 = 0;
      if (this.b.u) {
         var5 |= 1;
      }

      if (this.b.k != null && !"".equals(this.b.k)) {
         var5 |= 2;
         var4 |= 1;
      }

      if (this.b.m != null && !"".equals(this.b.m)) {
         var5 |= 4;
         var4 |= 1;
      }

      if (this.b.o != null && !"".equals(this.b.o)) {
         var5 |= 8;
         var4 |= 1;
      }

      if (this.b.y != null && !"".equals(this.b.y)) {
         var5 |= 16;
         var4 |= 1;
      }

      if (this.b.i != null && !"".equals(this.b.i)) {
         var5 |= 32;
         var4 |= 1;
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, this.c, var3, 2);
      var3 += 2;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, this.c, var3, 2);
      var3 += 2;
      this.c[var3] = this.b.d();
      var3 += 4;
      this.c[var3] = this.b.e();
      var3 += 4;
      zcch.a(this.c, var3, this.b.w);
      var3 += 4 + this.b.w.length() * 2;
      if (this.b.d != null) {
         System.arraycopy(this.b.d, 0, this.c, var3, this.b.d.length);
         var3 += this.b.d.length;
      } else {
         var3 += 8;
      }

      zcch.a(this.c, var3, this.b.j);
      var3 += 4 + (this.b.j == null ? 0 : this.b.j.length() * 2);
      zcch.a(this.c, var3, this.b.l);
      var3 += 4 + (this.b.l == null ? 0 : this.b.l.length() * 2);
      zcch.a(this.c, var3, this.b.n);
      var3 += 4 + (this.b.n == null ? 0 : this.b.n.length() * 2);
      zcch.a(this.c, var3, this.b.x);
      var3 += 4 + (this.b.x == null ? 0 : this.b.x.length() * 2);
      zcch.a(this.c, var3, this.b.h);
      var3 += 4 + (this.b.h == null ? 0 : this.b.h.length() * 2);
      if (this.b.c != null) {
         System.arraycopy(this.b.c, 0, this.c, var3, this.b.c.length);
         var3 += this.b.c.length;
      } else {
         var3 += 8;
      }

      zcch.a(this.c, var3, this.b.k);
      var3 += 4 + (this.b.k == null ? 0 : this.b.k.length() * 2);
      zcch.a(this.c, var3, this.b.m);
      var3 += 4 + (this.b.m == null ? 0 : this.b.m.length() * 2);
      zcch.a(this.c, var3, this.b.o);
      var3 += 4 + (this.b.o == null ? 0 : this.b.o.length() * 2);
      zcch.a(this.c, var3, this.b.y);
      var3 += 4 + (this.b.y == null ? 0 : this.b.y.length() * 2);
      zcch.a(this.c, var3, this.b.i);
      int var10000 = var3 + 4 + (this.b.i == null ? 0 : this.b.i.length() * 2);
   }

   private int a(String var1) {
      return 4 + (var1 == null ? 0 : var1.length() * 2);
   }
}
